//
//  ZLViewController.m
//  BaseProject
//
//  Created by itzhaolei on 2024/7/12.
//

#import "ZLViewController.h"
#import <ZLNavigationBar/ZLNavigationBar.h>

@interface ZLViewController()

@end

@implementation ZLViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addSubviews];
    [self addConstraints];
}

#pragma mark - Add
- (void)addSubviews {
    [self.view addSubview:self.navBar];
}

#pragma mark - Constraints
- (void)addConstraints {
    ZL_Navigation_Height(navigationHeight, isBangDevice);
    [self.navBar mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(navigationHeight);
        make.leading.trailing.equalTo(self.view);
    }];
}

#pragma mark - Lazy
- (ZLNavigationBar *)navBar {
    if (!_navBar) {
        ZLNavigationBar *view = [[ZLNavigationBar alloc] init];
        _navBar = view;
    }
    return _navBar;
}

@end
